Evaluating Short-Term Restoration Approaches for Degraded Grasslands in Kenya

Author

Ridhin Paul

Summary

This project evaluates the short-term effectiveness of restoration methods for degraded grasslands in Kenya. The treatments include Tilage (T), the addition of native soil inoculum (S) and Manure (M). “A grazing exclosure was installed at the campus of the Kabianga University in Kenya in April 2022, when restoration treatments were laid out and baseline soil samples taken and analysed for key soil physical, chemical and biological properties. In November 2022, fresh soil samples were taken to track short- term changes in the soil. In addition, we assessed the plant community species composition, and measured in situ soil respiration rates.” Refer “Grassland restoration experiment Kabianga Kenya.pdf” for more info.

Loading required packages

library(tidyverse)
library(readxl)
library(GGally)
library(VIM)

Loading all datasets

Some unwanted columns have also been removed.

#Kabianga
kab.nov.22 <- read_excel("data/DSAS_REDEAL_Assign_Data_Aug2.xlsx" , sheet = 'Kab_nov_2022', na = c("NA", NA)) |>
  select(-c(...21,...22))
kab.dec.23 <- read_excel("data/DSAS_REDEAL_Assign_Data_Aug2.xlsx" , sheet = 'Kab_dec_2023', na = c("NA", NA)) 

#Thurgem
thur.jun.22 <- read_excel("data/DSAS_REDEAL_Assign_Data_Aug2.xlsx" , sheet = 'Thur_june_2022', na = c("NA", NA)) |>
  select(-c(...13,...14))

thur.july.23 <- read_excel("data/DSAS_REDEAL_Assign_Data_Aug2.xlsx" , sheet = 'Thur_july_2023', na = c("NA", NA)) |>
  select(-c(...15,...16))

thur.dec.23 <- read_excel("data/DSAS_REDEAL_Assign_Data_Aug2.xlsx" , sheet = 'Thur_dec_2023', na = c("NA", NA))

#Kapsarok
kaps.jun.22 <- read_excel("data/DSAS_REDEAL_Assign_Data_Aug2.xlsx" , sheet = 'Kaps_june_2022', na = c("NA", NA)) |>
  select(-c(...13,...14)) 

Data exploration

Missing value check

aggr(kab.nov.22, prop = F, numbers = T) 

aggr(kab.dec.23, prop = F, numbers = T)

aggr(thur.jun.22, prop = F, numbers = T)

aggr(thur.july.23, prop = F, numbers = T)

aggr(thur.dec.23, prop = F, numbers = T)

aggr(kaps.jun.22, prop = F, numbers = T)

For the dataset kab.nov.23 the plot indicate the last row has all NA entries which is removed. And for the dataset kaps.jun.22 there are 2 NA entries in the YIELD column, here the average based on the type of treatment for which the value is missing is taken and replaced. Since there are only 2 NA values, code is not written for the entire column.

kab.nov.23 <- kab.nov.22|>
  na.omit()

mean_yield_1 <- kaps.jun.22 |>
  filter(Code == "S") |>
  pull(YIELD) |>
  mean(na.rm = TRUE)

mean_yield_2 <- kaps.jun.22 |>
  filter(Code == "ST") |>
  pull(YIELD) |>
  mean(na.rm = TRUE)

kaps.jun.22 <- kaps.jun.22 |>
  mutate(YIELD = if_else(Code == "S" & is.na(YIELD), mean_yield_1, YIELD),
         YIELD = if_else(Code == "ST" & is.na(YIELD), mean_yield_2, YIELD)) 

Checking data types

For the variables Plot No., YIELD, DM, SPE, Tsoil, Tair, MOIS, RES, pH, EC, MBC, MBN, Nconc, Cconc, P, BD, NH4, NO3, Block and for each treatment (later converted to factor type) M, S and T numeric values are expected as entry.

glimpse(kab.nov.22)
Rows: 33
Columns: 20
$ `Plot No.` <dbl> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, …
$ Block      <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3,…
$ Treatment  <chr> "Soil", "Manure+Soil+Tillage", "Control", "Manure", "Manure…
$ Code       <chr> "S", "MST", "C", "M", "MT", "MS", "ST", "T", "MST", "ST", "…
$ M          <dbl> -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1,…
$ S          <dbl> 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1,…
$ T          <dbl> -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, …
$ Tsoil      <dbl> 18.9, 18.6, 18.7, 18.7, 18.7, 18.7, 18.8, 19.7, 20.7, 21.8,…
$ Tair       <dbl> 19.7, 19.8, 20.2, 20.3, 20.6, 20.9, 21.7, 24.6, 29.9, 31.2,…
$ MOIS       <dbl> 53.6, 37.0, 51.7, 51.6, 40.4, 52.4, 37.6, 36.6, 40.4, 38.7,…
$ YIELD      <dbl> 21.2, 13.8, 15.2, 17.8, 16.0, 16.4, 18.1, 17.1, 16.8, 15.2,…
$ NH4        <dbl> 0.7, 1.1, 2.0, 1.6, 1.2, 1.8, 0.5, 0.7, 2.1, 0.5, 1.1, 1.2,…
$ NO3        <dbl> 22.8, 31.0, 23.6, 5.3, 12.6, 24.6, 25.1, 25.3, 45.6, 14.6, …
$ P          <dbl> 1.4, 2.5, 0.6, 1.4, 1.7, 1.3, 1.0, 2.1, 1.4, 1.7, 2.0, 3.2,…
$ pH         <dbl> 5.0, 4.9, 4.7, 4.5, 4.6, 4.7, 4.7, 4.7, 4.6, 4.6, 4.4, 4.6,…
$ EC         <dbl> 41.9, 47.4, 35.1, 11.6, 19.7, 38.5, 35.2, 36.8, 59.9, 22.0,…
$ MBC        <dbl> 461.6, 512.7, 577.2, 574.4, 440.7, 514.2, 440.1, 422.5, 514…
$ MBN        <dbl> 88.0, 109.9, 108.7, 109.4, 85.9, 93.4, 81.8, 83.8, 98.5, 93…
$ Nconc      <dbl> 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.4, 0.5, 0.5, 0.5, 0.4,…
$ Cconc      <dbl> 5.1, 5.4, 5.4, 5.0, 5.1, 5.3, 4.9, 4.8, 5.2, 5.3, 5.8, 4.6,…
glimpse(kab.dec.23)
Rows: 32
Columns: 10
$ `Plot No.` <dbl> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, …
$ Block      <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3,…
$ Treatment  <chr> "Soil", "Manure+Soil+Tillage", "Control", "Manure", "Manure…
$ Code       <chr> "S", "MST", "C", "M", "MT", "MS", "ST", "T", "MST", "ST", "…
$ M          <dbl> -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1,…
$ S          <dbl> 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1,…
$ T          <dbl> -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, …
$ BD         <dbl> 0.3589024, 0.4051220, 0.3829878, 0.4227439, 0.4143293, 0.38…
$ P          <dbl> 5.9156125, 3.1895944, 1.5363629, 1.3363361, 1.8315103, 1.40…
$ YIELD      <dbl> 10.43400, 6.74075, 6.88250, 6.60400, 5.60350, 6.98075, 11.3…
glimpse(thur.jun.22)
Rows: 32
Columns: 12
$ `Plot No.` <dbl> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, …
$ Block      <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3,…
$ Treatment  <chr> "Soil", "Tillage + Soil + Manure", "Control", "Manure", "Ti…
$ Code       <chr> "S", "MST", "C", "M", "MT", "MS", "ST", "T", "MST", "ST", "…
$ M          <dbl> -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1,…
$ S          <dbl> 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1,…
$ T          <dbl> -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, …
$ Tsoil      <dbl> 21.8, 22.5, 22.8, 23.5, 24.0, 24.4, 24.8, 25.7, 26.6, 27.7,…
$ Tair       <dbl> 24.1, 25.7, 26.7, 27.4, 28.0, 27.8, 28.7, 30.7, 32.8, 33.8,…
$ MOIS       <dbl> 44.7, 46.3, 45.0, 42.7, 28.0, 43.2, 33.3, 38.1, 33.0, 39.5,…
$ YIELD      <dbl> 4.2, 5.8, 3.8, 3.1, 3.5, 5.1, 3.9, 2.5, 3.9, 4.2, 1.6, 6.7,…
$ EC         <dbl> 136.0, 149.5, 165.3, 182.6, 176.0, 190.4, 152.0, 148.0, 128…
glimpse(thur.july.23)
Rows: 32
Columns: 14
$ Plot_No   <dbl> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 1…
$ Block     <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, …
$ Treatment <chr> "Soil", "Tillage + Soil + Manure", "Control", "Manure", "Til…
$ Code      <chr> "S", "MST", "C", "M", "MT", "MS", "ST", "T", "MST", "ST", "M…
$ M         <dbl> -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, …
$ S         <dbl> 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, …
$ T         <dbl> -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1…
$ Tsoil     <dbl> 23.7, 23.6, 23.9, 24.8, 25.1, 25.0, 25.2, 26.7, 26.4, 28.0, …
$ Tair      <dbl> 25.3, 26.3, 28.0, 30.4, 32.3, 32.1, 32.4, 35.3, 33.5, 33.9, …
$ MOIS      <dbl> 48.1, 52.3, 47.3, 40.1, 47.9, 39.6, 47.8, 45.9, 51.6, 44.4, …
$ DW        <dbl> 162.7, 214.9, 270.3, 262.5, 298.1, 648.9, 646.1, 465.1, 253.…
$ YIELD     <dbl> 4.1, 5.4, 6.8, 6.6, 7.5, 16.2, 16.2, 11.6, 6.3, 8.4, 4.0, 19…
$ Nconc     <dbl> 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, …
$ Cconc     <dbl> 1.0, 1.1, 1.3, 1.0, 1.0, 1.4, 1.2, 1.2, 0.9, 0.9, 0.8, 1.4, …
glimpse(thur.dec.23)
Rows: 32
Columns: 10
$ `Plot No.` <dbl> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, …
$ Block      <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3,…
$ Treatment  <chr> "Soil", "Tillage + Soil + Manure", "Control", "Manure", "Ti…
$ Code       <chr> "S", "MST", "C", "M", "MT", "MS", "ST", "T", "MST", "ST", "…
$ M          <dbl> -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1,…
$ S          <dbl> 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1,…
$ T          <dbl> -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, …
$ MOIS       <dbl> 55.30603, 63.17742, 60.24427, 56.02128, 59.56154, 60.94444,…
$ P          <dbl> 2.7800613, 1.6521765, 1.6484200, 1.5918039, 1.6554478, 1.41…
$ YIELD      <dbl> 2.59225, 2.85375, 1.30200, 1.55025, 2.62850, 4.39375, 4.625…
glimpse(kaps.jun.22)
Rows: 32
Columns: 12
$ Plot_No.  <dbl> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 1…
$ Block     <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, …
$ Treatment <chr> "Soil", "Tillage + Soil + Manure", "Control", "Manure", "Til…
$ Code      <chr> "S", "MST", "C", "M", "MT", "MS", "ST", "T", "MST", "ST", "M…
$ M         <dbl> -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, …
$ S         <dbl> 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, …
$ T         <dbl> -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1…
$ Tsoil     <dbl> 21.9, 21.9, 22.4, 23.5, 24.2, 24.7, 25.4, 26.2, 26.7, 28.7, …
$ Tair      <dbl> 24.3, 24.9, 26.1, 27.0, 28.8, 30.9, 32.5, 31.4, 32.0, 35.6, …
$ MOIS      <dbl> 12.0, 15.1, 19.9, 19.3, 25.4, 28.8, 26.2, 22.4, 18.9, 24.3, …
$ YIELD     <dbl> 1.866667, 2.900000, 1.400000, 2.300000, 10.300000, 6.500000,…
$ EC        <dbl> 106.0, 136.6, 140.8, 156.4, 110.8, 127.8, 101.8, 184.4, 140.…

All results where as expected.

Exploratory data analysis

Check for multicolinearity

  1. Kabianga November 2023
kab.nov.22 |>
  select(-`Plot No.`, - Treatment, -M, -S, -T) |> 
  ggpairs()

  1. Kabianga December 2023
kab.dec.23 |>
  select(-`Plot No.`, - Treatment, -M, -S, -T) |> 
  ggpairs()

  1. Thurgem June 2022
thur.jun.22 |>
  select(-`Plot No.`, - Treatment, -M, -S, -T) |> 
  ggpairs()

  1. Thurgem July 2023
thur.july.23 |>
  select(-Plot_No, - Treatment, -M, -S, -T) |> 
  ggpairs()

  1. Thurgem Dec 2023
thur.dec.23 |>
  select(- `Plot No.`, - Treatment, -M, -S, -T) |> 
  ggpairs()

  1. Kapsorok June 2022
kaps.jun.22 |>
  select(-Plot_No., - Treatment, -M, -S, -T) |> 
  ggpairs()

Histogram of YIELD by Treatment faceted by Block

  1. Kabianga November 2023
ggplot(kab.nov.23, aes(x = Treatment, y = YIELD)) +
  geom_bar(color = "black", alpha = 0.7, stat = "identity") +
  labs(title = "Histogram of YIELD by Treaetment faceted by Block (Kabianga Nov 2023)", x = "Treatment", y = "Yield") +
    facet_wrap(~Block) +
  theme_minimal() 

  1. Kabianga December 2023
ggplot(thur.jun.22, aes(x = Code, y = YIELD)) +
  geom_bar(color = "black", alpha = 0.7, stat = "identity") +
  labs(title = "Histogram of YIELD by Treaetment faceted by Block (Kabianga Dec 2023)", x = "Treatment", y = "Yield") +
    facet_wrap(~Block) +
  theme_minimal() 

  1. Thurgem June 2022
ggplot(kab.dec.23, aes(x = Code, y = YIELD)) +
  geom_bar(color = "black", alpha = 0.7, stat = "identity") +
  labs(title = "Histogram of YIELD by Treaetment faceted by Block (Thurgem June 2022)", x = "Treatment", y = "Yield") +
    facet_wrap(~Block) +
  theme_minimal() 

  1. Thurgem July 2023
ggplot(thur.july.23, aes(x = Code, y = YIELD)) +
  geom_bar(color = "black", alpha = 0.7, stat = "identity") +
  labs(title = "Histogram of YIELD by Treaetment faceted by Block (Thurgem July 2023)", x = "Treatment", y = "Yield") +
    facet_wrap(~Block) +
  theme_minimal() 

  1. Thurgem Dec 2023
ggplot(thur.dec.23, aes(x = Code, y = YIELD)) +
  geom_bar(color = "black", alpha = 0.7, stat = "identity") +
  labs(title = "Histogram of YIELD by Treaetment faceted by Block (Thurgem Dec 2023)", x = "Treatment", y = "Yield") +
    facet_wrap(~Block) +
  theme_minimal() 

  1. Kapsorok June 2022
ggplot(kaps.jun.22, aes(x = Code, y = YIELD)) +
  geom_bar(color = "black", alpha = 0.7, stat = "identity") +
  labs(title = "Histogram of YIELD by Treaetment faceted by Block (Kapsorok June 2023)", x = "Treatment", y = "Yield") +
    facet_wrap(~Block) +
  theme_minimal() 

kab.dec.23 |>
  select(-`Plot No.`, - Treatment, -M, -S, -T) |> 
  ggpairs()
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.